package util;

import java.util.Objects;

import org.junit.Test;

public class UtilsTest {
	@Test
	public void objects() {
		// Objects是对象工具类
		String s1 = "abc";
		String s2 = "abc";
		System.out.println(Objects.equals(s1, s2));
		int compare = Objects.compare(s1, s2, String::compareTo);  // s1.compareTo(s2);
		System.out.println(compare);
		
		System.out.println(Objects.isNull(s1)); // 是空
		System.out.println(Objects.nonNull(s1)); // 非空
		
		//alt+shift+a 多行选中 
	}
}
